package viewControllers.robot;

import java.util.ArrayList;

import viewControllers.AnimationPart;
import viewControllers.Animator;


public class RobotWalkAnimator extends Animator {

	public RobotWalkAnimator(ArrayList<AnimationPart> parts) {
		super(parts);
	}
	
	public void play(){
		if (!stoped){
			frame++;
			for (AnimationPart part : parts){
				if (part instanceof Leg){
					((Leg)part).play(frame);
				}else if (part instanceof Torso){
					((Torso)part).play(frame);
				}else{ 
					part.play(frame);
				}
			}
		}
	}
}
